<x-app>
    <x-header>
        <x-nav/>
    </x-header>

    <x-search-bar />

    <div class="p-2 mt-2">
        <div class="flex items-center">
            <span class="font-bold tracking-widest">每日更新 · 最新影片</span>
            <a wire:navigate href="{{ route('videos.index') }}" class="text-sm ml-auto text-neutral-400 flex items-center">
                查看更多
                <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
                    <path fill-rule="evenodd" d="M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z" clip-rule="evenodd"/>
                </svg>
            </a>
        </div>
    </div>

    <livewire:video-part-list per-page="4" :key="0"/>

    @foreach(\App\Models\Category::has('videos')->get() as $index => $v)
        <div class="p-2 mt-2">
            <div class="flex items-center">
                <span class="font-bold tracking-widest">{{ $v->title }}</span>
                <a href="{{ $v->presenter()->show }}" class="text-sm ml-auto text-neutral-400 flex items-center">
                    查看更多
                    <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
                        <path fill-rule="evenodd" d="M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z" clip-rule="evenodd"/>
                    </svg>
                </a>
            </div>
        </div>

        <livewire:video-part-list per-page="5" :category="$v->id" top-big :key="$v->id" lazy/>
    @endforeach
</x-app>
